package com.tdkj.model.shop;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * 
 */
@Entity
@Table(name = "shop_good_showcase")
public class BeanGoodShowcase extends BaseEntity {

	private BeanShop shop;
	private Integer quantity;
	private List<BeanGood> goods;
	
	
	/**
	 * @return the custom
	 */
	@OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH}, mappedBy="showcase")
	public BeanShop getShop() {
		return shop;
	}
	/**
	 * @param custom the custom to set
	 */
	public void setShop(BeanShop shop) {
		this.shop = shop;
	}
	
	/**
	 * @return the goods
	 */
	@OneToMany(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH}, mappedBy="showcase")
	public List<BeanGood> getGoods() {
		return goods;
	}
	/**
	 * @param goods the goods to set
	 */
	public void setGoods(List<BeanGood> goods) {
		this.goods = goods;
	}
	/**
	 * @return the quantity
	 */
	public Integer getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity the quantity to set
	 */
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	
}